package net.zjitc.service;

import net.zjitc.common.ServiceResponse;
import net.zjitc.pojo.Category;
import net.zjitc.pojo.Condition;
import net.zjitc.pojo.Products;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface ProductsService {
    List<Products> findAllProducts();

    ServiceResponse addProduct(Products products, MultipartFile file, HttpServletRequest request);

    List<Category> findAllCategory();

    Products findProductById(String id);

    int deleteProduct(String id);

    ServiceResponse editProduct(Products products, MultipartFile file, HttpServletRequest request);

    List<Products> searchByCondition(Condition condition);


    Products findNewProducts(String product_id);

    Category findCategoryById(Integer id);

    List<Products> findProductByCid(Integer id);
}
